package com.loveprogrammer.eternity.skill.support.skills.passive;

import com.loveprogrammer.eternity.model.Character;
import com.loveprogrammer.eternity.model.attack.AttackResult;
import com.loveprogrammer.eternity.skill.Skill;
import com.loveprogrammer.eternity.skill.support.skills.AbstractSkill;

/**
 *
 * @version 1.0.0
 * @description: 被动技能 召唤
 * @author: eric
 * @date: 2022-08-22 17:59
 **/
public abstract class AbstractPassiveCallSkill extends AbstractSkill {

    private AttackResult attackResult;

    protected AbstractPassiveCallSkill(int id, int baseInterval, int level, int order, int maxLevel, String name, String desc) {
        super(id, baseInterval, level, order, maxLevel, name, desc);
    }

    @Override
    public int opportunityPassive() {
        return 3;
    }

    @Override
    public boolean check(Character character) {
        // 死了光环效果就没了
        return !character.checkDead();
    }

    @Override
    public Skill assembleAttackEntity(AttackResult attackResult) {
        this.attackResult = attackResult;
        return this;
    }

    public AttackResult getAttackResult() {
        return attackResult;
    }
}
